<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html>
        <head>
          <title>utils - it.agilelab.bigdata.spark.search.utils</title>
          <meta name="description" content="utils - it.agilelab.bigdata.spark.search.utils" />
          <meta name="keywords" content="utils it.agilelab.bigdata.spark.search.utils" />
          <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
          
      <link href="../../../../../../lib/template.css" media="screen" type="text/css" rel="stylesheet" />
      <link href="../../../../../../lib/diagrams.css" media="screen" type="text/css" rel="stylesheet" id="diagrams-css" />
      <script type="text/javascript">
         if(top === self) {
            var url = '../../../../../../index.html';
            var hash = 'it.agilelab.bigdata.spark.search.utils.package';
            var anchor = window.location.hash;
            var anchor_opt = '';
            if (anchor.length >= 1)
              anchor_opt = '@' + anchor.substring(1);
            window.location.href = url + '#' + hash + anchor_opt;
         }
   	  </script>
    
        </head>
        <body class="value">
      <div id="definition">
        <img src="../../../../../../lib/package_big.png" />
        <p id="owner"><a href="../../../../../package.html" class="extype" name="it">it</a>.<a href="../../../../package.html" class="extype" name="it.agilelab">agilelab</a>.<a href="../../../package.html" class="extype" name="it.agilelab.bigdata">bigdata</a>.<a href="../../package.html" class="extype" name="it.agilelab.bigdata.spark">spark</a>.<a href="../package.html" class="extype" name="it.agilelab.bigdata.spark.search">search</a></p>
        <h1>utils</h1>
      </div>

      <h4 id="signature" class="signature">
      <span class="modifier_kind">
        <span class="modifier"></span>
        <span class="kind">package</span>
      </span>
      <span class="symbol">
        <span class="name">utils</span>
      </span>
      </h4>
      
          <div id="comment" class="fullcommenttop"><div class="toggleContainer block">
          <span class="toggle">Linear Supertypes</span>
          <div class="superTypes hiddenContent"><span class="extype" name="scala.AnyRef">AnyRef</span>, <span class="extype" name="scala.Any">Any</span></div>
        </div></div>
        

      <div id="mbrsel">
        <div id="textfilter"><span class="pre"></span><span class="input"><input id="mbrsel-input" type="text" accesskey="/" /></span><span class="post"></span></div>
        <div id="order">
              <span class="filtertype">Ordering</span>
              <ol>
                
                <li class="alpha in"><span>Alphabetic</span></li>
                <li class="inherit out"><span>By inheritance</span></li>
              </ol>
            </div>
        <div id="ancestors">
                <span class="filtertype">Inherited<br />
                </span>
                <ol id="linearization">
                  <li class="in" name="it.agilelab.bigdata.spark.search.utils"><span>utils</span></li><li class="in" name="scala.AnyRef"><span>AnyRef</span></li><li class="in" name="scala.Any"><span>Any</span></li>
                </ol>
              </div><div id="ancestors">
            <span class="filtertype"></span>
            <ol>
              <li class="hideall out"><span>Hide All</span></li>
              <li class="showall in"><span>Show all</span></li>
            </ol>
            <a href="http://docs.scala-lang.org/overviews/scaladoc/usage.html#members" target="_blank">Learn more about member selection</a>
          </div>
        <div id="visbl">
            <span class="filtertype">Visibility</span>
            <ol><li class="public in"><span>Public</span></li><li class="all out"><span>All</span></li></ol>
          </div>
      </div>

      <div id="template">
        <div id="allMembers">
        

        <div id="types" class="types members">
              <h3>Type Members</h3>
              <ol><li name="it.agilelab.bigdata.spark.search.utils.Logging" visbl="pub" data-isabs="true" fullComment="no" group="Ungrouped">
      <a id="LoggingextendsAnyRef"></a>
      <a id="Logging:Logging"></a>
      <h4 class="signature">
      <span class="modifier_kind">
        <span class="modifier"></span>
        <span class="kind">trait</span>
      </span>
      <span class="symbol">
        <a href="Logging.html"><span class="name">Logging</span></a><span class="result"> extends <span class="extype" name="scala.AnyRef">AnyRef</span></span>
      </span>
      </h4>
      <p class="comment cmt">Logging helper trait.</p>
    </li><li name="it.agilelab.bigdata.spark.search.utils.wikipage" visbl="pub" data-isabs="false" fullComment="no" group="Ungrouped">
      <a id="wikipageextendsIndexablewithStoreable[String]withProductwithSerializable"></a>
      <a id="wikipage:wikipage"></a>
      <h4 class="signature">
      <span class="modifier_kind">
        <span class="modifier"></span>
        <span class="kind">case class</span>
      </span>
      <span class="symbol">
        <a href="wikipage.html"><span class="name">wikipage</span></a><span class="params">(<span name="title">title: <span class="extype" name="scala.Predef.String">String</span></span>, <span name="text">text: <span class="extype" name="scala.Predef.String">String</span></span>)</span><span class="result"> extends <a href="../Indexable.html" class="extype" name="it.agilelab.bigdata.spark.search.Indexable">Indexable</a> with <a href="../Storeable.html" class="extype" name="it.agilelab.bigdata.spark.search.Storeable">Storeable</a>[<span class="extype" name="scala.Predef.String">String</span>] with <a href="http://www.scala-lang.org/api/2.10.6/index.html#scala.Product" class="extype" target="_top">Product</a> with <a href="http://www.scala-lang.org/api/2.10.6/index.html#scala.Serializable" class="extype" target="_top">Serializable</a></span>
      </span>
      </h4>
      
    </li></ol>
            </div>

        

        <div id="values" class="values members">
              <h3>Value Members</h3>
              <ol><li name="it.agilelab.bigdata.spark.search.utils.IDFUtils" visbl="pub" data-isabs="false" fullComment="no" group="Ungrouped">
      <a id="IDFUtils"></a>
      <a id="IDFUtils:IDFUtils"></a>
      <h4 class="signature">
      <span class="modifier_kind">
        <span class="modifier"></span>
        <span class="kind">object</span>
      </span>
      <span class="symbol">
        <a href="IDFUtils$.html"><span class="name">IDFUtils</span></a>
      </span>
      </h4>
      <p class="comment cmt">Utility methods for IDF calculations
</p>
    </li><li name="it.agilelab.bigdata.spark.search.utils.WikipediaXmlDumpParser" visbl="pub" data-isabs="false" fullComment="no" group="Ungrouped">
      <a id="WikipediaXmlDumpParser"></a>
      <a id="WikipediaXmlDumpParser:WikipediaXmlDumpParser"></a>
      <h4 class="signature">
      <span class="modifier_kind">
        <span class="modifier"></span>
        <span class="kind">object</span>
      </span>
      <span class="symbol">
        <a href="WikipediaXmlDumpParser$.html"><span class="name">WikipediaXmlDumpParser</span></a>
      </span>
      </h4>
      
    </li><li name="it.agilelab.bigdata.spark.search.utils.package#merge" visbl="pub" data-isabs="false" fullComment="yes" group="Ungrouped">
      <a id="merge[T](a1:Array[(T,Double)],a2:Array[(T,Double)],max:Int):Array[(T,Double)]"></a>
      <a id="merge[T](Array[(T,Double)],Array[(T,Double)],Int):Array[(T,Double)]"></a>
      <h4 class="signature">
      <span class="modifier_kind">
        <span class="modifier"></span>
        <span class="kind">def</span>
      </span>
      <span class="symbol">
        <span class="name">merge</span><span class="tparams">[<span name="T">T</span>]</span><span class="params">(<span name="a1">a1: <a href="http://www.scala-lang.org/api/2.10.6/index.html#scala.Array" class="extype" target="_top">Array</a>[(<span class="extype" name="it.agilelab.bigdata.spark.search.utils.merge.T">T</span>, <a href="http://www.scala-lang.org/api/2.10.6/index.html#scala.Double" class="extype" target="_top">Double</a>)]</span>, <span name="a2">a2: <a href="http://www.scala-lang.org/api/2.10.6/index.html#scala.Array" class="extype" target="_top">Array</a>[(<span class="extype" name="it.agilelab.bigdata.spark.search.utils.merge.T">T</span>, <a href="http://www.scala-lang.org/api/2.10.6/index.html#scala.Double" class="extype" target="_top">Double</a>)]</span>, <span name="max">max: <a href="http://www.scala-lang.org/api/2.10.6/index.html#scala.Int" class="extype" target="_top">Int</a></span>)</span><span class="result">: <a href="http://www.scala-lang.org/api/2.10.6/index.html#scala.Array" class="extype" target="_top">Array</a>[(<span class="extype" name="it.agilelab.bigdata.spark.search.utils.merge.T">T</span>, <a href="http://www.scala-lang.org/api/2.10.6/index.html#scala.Double" class="extype" target="_top">Double</a>)]</span>
      </span>
      </h4>
      <p class="shortcomment cmt">Merges two arrays of tuples of type <code>(T, Double)</code>, sorted in descending order according to the second element,
into one array of up to <code>max</code> size, sorted in descending order.</p><div class="fullcomment"><div class="comment cmt"><p>Merges two arrays of tuples of type <code>(T, Double)</code>, sorted in descending order according to the second element,
into one array of up to <code>max</code> size, sorted in descending order.
</p></div><dl class="paramcmts block"><dt class="tparam">T</dt><dd class="cmt"><p>the type of the first element of the tuple</p></dd><dt class="param">a1</dt><dd class="cmt"><p>the first array</p></dd><dt class="param">a2</dt><dd class="cmt"><p>the second array</p></dd><dt class="param">max</dt><dd class="cmt"><p>the maximum size of the returned array</p></dd><dt>returns</dt><dd class="cmt"><p>a new array of up to <code>max</code> size, containing the tuples from the input arrays, in descending order
</p></dd></dl></div>
    </li><li name="it.agilelab.bigdata.spark.search.utils.package#mergeIterators" visbl="pub" data-isabs="false" fullComment="yes" group="Ungrouped">
      <a id="mergeIterators[T](i1:Iterator[(T,Double)],i2:Iterator[(T,Double)],maxSize:Int):Iterator[(T,Double)]"></a>
      <a id="mergeIterators[T](Iterator[(T,Double)],Iterator[(T,Double)],Int):Iterator[(T,Double)]"></a>
      <h4 class="signature">
      <span class="modifier_kind">
        <span class="modifier"></span>
        <span class="kind">def</span>
      </span>
      <span class="symbol">
        <span class="name">mergeIterators</span><span class="tparams">[<span name="T">T</span>]</span><span class="params">(<span name="i1">i1: <span class="extype" name="scala.Iterator">Iterator</span>[(<span class="extype" name="it.agilelab.bigdata.spark.search.utils.mergeIterators.T">T</span>, <a href="http://www.scala-lang.org/api/2.10.6/index.html#scala.Double" class="extype" target="_top">Double</a>)]</span>, <span name="i2">i2: <span class="extype" name="scala.Iterator">Iterator</span>[(<span class="extype" name="it.agilelab.bigdata.spark.search.utils.mergeIterators.T">T</span>, <a href="http://www.scala-lang.org/api/2.10.6/index.html#scala.Double" class="extype" target="_top">Double</a>)]</span>, <span name="maxSize">maxSize: <a href="http://www.scala-lang.org/api/2.10.6/index.html#scala.Int" class="extype" target="_top">Int</a></span>)</span><span class="result">: <span class="extype" name="scala.Iterator">Iterator</span>[(<span class="extype" name="it.agilelab.bigdata.spark.search.utils.mergeIterators.T">T</span>, <a href="http://www.scala-lang.org/api/2.10.6/index.html#scala.Double" class="extype" target="_top">Double</a>)]</span>
      </span>
      </h4>
      <p class="shortcomment cmt">Merges two iterators of tuples of type <code>(T, Double)</code>, sorted in descending order according to the second element,
into one iterator of up to <code>max</code> size, sorted in descending order.</p><div class="fullcomment"><div class="comment cmt"><p>Merges two iterators of tuples of type <code>(T, Double)</code>, sorted in descending order according to the second element,
into one iterator of up to <code>max</code> size, sorted in descending order.
</p></div><dl class="paramcmts block"><dt class="tparam">T</dt><dd class="cmt"><p>the type of the first element of the tuple</p></dd><dt class="param">i1</dt><dd class="cmt"><p>the first iterator</p></dd><dt class="param">i2</dt><dd class="cmt"><p>the second iterator</p></dd><dt class="param">maxSize</dt><dd class="cmt"><p>the maximum size of the returned iterator</p></dd><dt>returns</dt><dd class="cmt"><p>a new iterator of up to <code>max</code> size, containing the tuples from the input iterators, in descending order
</p></dd></dl><dl class="attributes block"> <dt>Note</dt><dd><span class="cmt"><p>Only works if iterators never return null values! This however should not be a problem, as null values cannot
      be ordered anyway.</p></span></dd></dl></div>
    </li></ol>
            </div>

        

        
        </div>

        <div id="inheritedMembers">
        <div class="parent" name="scala.AnyRef">
              <h3>Inherited from <span class="extype" name="scala.AnyRef">AnyRef</span></h3>
            </div><div class="parent" name="scala.Any">
              <h3>Inherited from <span class="extype" name="scala.Any">Any</span></h3>
            </div>
        
        </div>

        <div id="groupedMembers">
        <div class="group" name="Ungrouped">
              <h3>Ungrouped</h3>
              
            </div>
        </div>

      </div>

      <div id="tooltip"></div>

      <div id="footer">  </div>
      <script defer="defer" type="text/javascript" id="jquery-js" src="../../../../../../lib/jquery.js"></script><script defer="defer" type="text/javascript" id="jquery-ui-js" src="../../../../../../lib/jquery-ui.js"></script><script defer="defer" type="text/javascript" id="tools-tooltip-js" src="../../../../../../lib/tools.tooltip.js"></script><script defer="defer" type="text/javascript" id="template-js" src="../../../../../../lib/template.js"></script>
    </body>
      </html>